
cmake_minimum_required(VERSION 2.8)

PROJECT(MacroTool)  
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)

set(EXECUTABLE_OUTPUT_PATH ${MacroTool_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH  ${MacroTool_BINARY_DIR}/bin)

set(LIBS ${LIBRARY_OUTPUT_PATH})
LINK_DIRECTORIES(${LIBS})

OPTION(USE_DMDLL_ "Compile DMMain as dll"   ON) 
if(USE_DMDLL_)
	ADD_DEFINITIONS(-DDLL_DMMAIN)
endif()

OPTION(USE_DMLOG_  "DM open log"    ON)
if(USE_DMLOG_)
	ADD_DEFINITIONS(-DDMLOG_ON)
endif()

LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
INCLUDE(PrecompiledHeader)

ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/DMMain)
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/DMMacro)